<script>on mouseUpput empty into blobput bg field "map" into mapput cd field "chart" of card "editor" into chartput 105 into irepeat while return is in mapif char i of map = return thenput empty into char i of mapend ifadd 104 to iput i into messageend repeatput map into bg field "map"put the number of chars of map into nif n<> 5404 thenanswer "There must be exactly 5404 characters." with "OKelseput 1 into irepeat while i < nput char i to (i+1) of map into thingput item 2 of FindinField(chart,thing,"true",0) into linif lin=0 thenput thing into messagebeepput "??" after blobelseput word 1 of line lin of chart after blobend ifadd 2 to iif the random of 50 is 1 thenput i/5404*100 into messageput blob into bg field "map" of card "new"end ifend repeatput blob into bg field "map" of card "new"hide messageend ifend mouseUp</script>
</part>
<part>
<id>8</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>1</left>
<top>425</top>
<right>100</right>
<bottom>441</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>copy in rnd</name>
<script>on mouseUpput bg field "map" of card "random" into bg field "map"end mouseUp</script>
</part>
<part>
<id>11</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>1</left>
<top>404</top>
<right>100</right>
<bottom>420</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>add returns</name>
<script>on mouseUpput empty into blobput bg field "map" into mapput 1 into irepeat with j=1 to 52put char i to i+103 of map after blobif j <> 52 then put return after blobadd 104 to iend repeatput blob into bg field "map"end mouseUp</script>
<script>on mouseUpput empty into blobput bg field "map" into mapput cd field "chart" of card "editor" into chartput the number of chars of map into nif n<> 5404 thenanswer "There must be exactly 5404 characters." with "OKelseput 1 into irepeat while i < nput char i to (i+1) of map into thingput item 2 of FindinField(chart,thing,"true",0) into linif lin=0 thenput thing into messagebeepend ifput word 2 of line lin of chart after blobadd 2 to iif the random of 200 is 1 thenput trunc(i/5404*100) & "% done . . ." into messageput blob into bg field "map" of card "char"end ifend repeatput blob into bg field "map" of card "char"end ifhide messageend mouseUp</script>
<script>on mouseUpask "How much coastal inlets (0-10)?" with 6put it into sizeif size is empty then exit mouseupask "Make everything else what? (G,T,~,S,B or =)" with "G"put it into defaltif defalt is empty then exit mouseupset the hilite of cd button the short name of me to trueput bg field "map" into cd field "before"get new(size,defalt)set the hilite of cd button the short name of me to falseend mouseUp</script>
</part>
<part>
<id>2</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>5</left>
<top>412</top>
<right>83</right>
<bottom>443</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>12</textHeight>
<name>t</name>
<script></script>
</part>
<part>
<id>5</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>4</left>
<top>249</top>
<right>42</right>
<bottom>269</bottom>
</rect>
<style>shadow</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Lake</name>
<script>on mouseUpask "What size for the lake (1-10)?" with "5"if it is empty then exit mouseupanswer "Random placement or point-n-click?" with "RANDOM" or "POINT"put 0 into xput 0 into yif it is "POINT" thenput "Click somewhere in the map area." into messageset the loc of message to 116,390repeat until the mouseclickend repeatput "please wait. . ." into messageput the mouseloc into coordsput the rect of bg field "map" into mcoordsput trunc((item 1 of coords - item 1 of mcoords)/5) into xput trunc((item 2 of coords - item 2 of mcoords)/6) into yend ifset the hilite of cd button the short name of me to trueput bg field "map" into cd field "before"get lake(it,x,y)set the hilite of cd button the short name of me to falsehide messageend mouseUp</script>
</part>
<part>
<id>6</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>0</left>
<top>293</top>
<right>94</right>
<bottom>314</bottom>
</rect>
<style>shadow</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Coast Swamp</name>
<script>on mouseUpask "How much swamp on the edges (1-10)?" with 4put it into sizeif size is empty then exit mouseupask "Only put swamp on what? (G,T,~,B or =)?" with "G"put it into defaltif defalt is empty then exit mouseupset the hilite of cd button the short name of me to trueput bg field "map" into cd field "before"get cswamp(size,defalt)set the hilite of cd button the short name of me to falseend mouseUp</script>
</part>
<part>
<id>9</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>3</left>
<top>422</top>
<right>99</right>
<bottom>472</bottom>
</rect>
<style>shadow</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>14953</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Undo Last Operation</name>
<script>on mouseUpput cd field "before" into tput bg field "map" into cd field "before"put t into bg field "map"end mouseUp</script>
</part>
<part>
<id>10</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>57</left>
<top>468</top>
<right>69</right>
<bottom>480</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>before</name>
<script></script>
</part>
<part>
<id>13</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>44</left>
<top>249</top>
<right>85</right>
<bottom>269</bottom>
</rect>
<style>shadow</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Trees</name>
<script>on mouseUpask "How much trees (1-10)?" with 3put it into sizeif size is empty then exit mouseupask "Only put trees on what? (G:grass,~:water,S:swamp,W:wall or =:road)?" with "G"put char 1 of it into defaltif defalt is empty then exit mouseupset the hilite of cd button the short name of me to trueput bg field "map" into cd field "before"get trees(size,defalt)set the hilite of cd button the short name of me to falseend mouseUp</script>
</part>
<part>
<id>14</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>45</left>
<top>271</top>
<right>86</right>
<bottom>291</bottom>
</rect>
<style>shadow</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Walls</name>
<script>on mouseUpask "How much walls (1-10)?" with 4put it into sizeif size is empty then exit mouseupask "Only put walls on what? (t:tree,G:grass,~:water,S:swamp or =:road)?" with "G"put char 1 of it into defaltif defalt is empty then exit mouseupset the hilite of cd button the short name of me to trueput bg field "map" into cd field "before"get walls(size,defalt)set the hilite of cd button the short name of me to falseend mouseUp</script>
</part>
<part>
<id>18</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>44</left>
<top>53</top>
<right>78</right>
<bottom>88</bottom>
</rect>
<style>shadow</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>32596</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Tree</name>
<script>on mouseUpunhilite(the short name of me)set the hilite of cd button the short name of me to trueend mouseUp</script>
</part>
<part>
<id>19</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>44</left>
<top>114</top>
<right>78</right>
<bottom>140</bottom>
</rect>
<style>shadow</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>16435</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Road</name>
<script>on mouseUpunhilite(the short name of me)set the hilite of cd button the short name of me to trueend mouseUp</script>
</part>
<part>
<id>20</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>7</left>
<top>114</top>
<right>41</right>
<bottom>140</bottom>
</rect>
<style>shadow</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>4576</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Wall</name>
<script>on mouseUpunhilite(the short name of me)set the hilite of cd button the short name of me to trueend mouseUp</script>
</part>
<part>
<id>21</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>7</left>
<top>89</top>
<right>41</right>
<bottom>113</bottom>
</rect>
<style>shadow</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>4006</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Water</name>
<script>on mouseUpunhilite(the short name of me)set the hilite of cd button the short name of me to trueend mouseUp</script>
</part>
<part>
<id>22</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>44</left>
<top>89</top>
<right>78</right>
<bottom>113</bottom>
</rect>
<style>shadow</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>5573</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Swamp</name>
<script>on mouseUpunhilite(the short name of me)set the hilite of cd button the short name of me to trueend mouseUp</script>
</part>
<part>
<id>23</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>7</left>
<top>53</top>
<right>41</right>
<bottom>88</bottom>
</rect>
<style>shadow</style>
<showName> <false /> </showName>
<highlight> <true /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>10800</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Grass</name>
<script>on mouseUpunhilite(the short name of me)set the hilite of cd button the short name of me to trueend mouseUp</script>
</part>
<part>
<id>24</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>113</left>
<top>421</top>
<right>178</right>
<bottom>473</bottom>
</rect>
<style>shadow</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>6544</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>map -> hex</name>
<script>on mouseUpput empty into blobput bg field "map" into mapput cd field "chart" into chartput 105 into irepeat while return is in mapif char i of map = return thenput empty into char i of mapend ifadd 104 to iput i into messageend repeatput length(map) into nif n<> 5404 thenanswer "There are " & n & " characters (should be 5404)." with "NOT OKexit mouseupelse if "*" is in map then-- check for too many pillboxesput item 1 of FindinField(map,"*","true",0) into pillput 0 into crepeat until pill = 0add 1 to cput item 1 of FindinField(map,"*","true",pill) into pillend repeatif c > 16 thenbeepanswer "error: Can't have more than 16 Pillboxes (I count " & c&")." with "OK"exit mouseupend ifelse if "+" is in map then-- check for too many basesput item 1 of FindinField(map,"+","true",0) into baseput 0 into crepeat until base = 0add 1 to cput item 1 of FindinField(map,"+","true",base) into baseend repeatif c > 16 thenbeepanswer "error: Can't have more than 16 Bases (I count " & c&")." with "OK"exit mouseupend ifend ifgo to card "new"put empty into basesput empty into pillboxesput 0 into baseput 0 into pillboxput 1 into irepeat while i < n-- deal with basesput char i to (i+1) of map into chunkif "+" is in chunk thenput trunc((i-1)/104)+1 into yput trunc(i-104*(y-1)) into xif char 1 of chunk = "+" thenput closeto(x,y) into chadd 1 to baseput x+18 & "," & y+9 into line base of basesput ch into char 1 of chunkend ifif char 2 of chunk = "+" thenput closeto(x+1,y) into chadd 1 to baseput x+19 & "," & y+9 into line base of basesput ch into char 2 of chunkend ifend if-- deal with pillboxesif "*" is in chunk thenput trunc((i-1)/104)+1 into yput trunc(i-104*(y-1)) into xif char 1 of chunk = "*" thenput closeto(x,y) into chadd 1 to pillboxput x+18 & "," & y+9 into line pillbox of pillboxesput ch into char 1 of chunkend ifif char 2 of chunk = "*" thenput closeto(x+1,y) into chadd 1 to pillboxput x+19 & "," & y+9 into line pillbox of pillboxesput ch into char 2 of chunkend ifend if--put offset(chunk,chart) into linif lin=0 thenput "Don't know what '"&thing&"' is. Mapping to '??'" into messagebeepwait 1 secsput "??" after blobelseput char lin-4 to lin-3 of chart after blobend ifadd 2 to iif the random of 100 is 1 thenput trunc(i/5404*100) & "% done . . ." into messageput blob into bg field "map" of card "new"end ifend repeatput blob into bg field "map" of card "new"hide messageput length(bg field "map" of card "new") into nif n <> 5404 thenanswer "There are "& n &" characters (should be 5404)." with "NOT xOK"else if "?" is in bg field "map" thenanswer "There is a ?? in the map." with "NOT OK"elseput bg field "map" into mapput cd field "premap" into premap-- convert bases to hexrepeat with i=1 to base--xput "," & item 1 of line i of bases into decxput offset(decx,cd field "convert") into tput char t-2 to t-1 of cd field "convert" into hexput i*2-1 into offput hex into char off to off+1 of premap--yput "," & item 2 of line i of bases into decyput offset(decy,cd field "convert") into tput char t-2 to t-1 of cd field "convert" into hexput 32+i*2-1 into offput hex into char off to off+1 of premap-- base owner - neutralput 64+i*2-1 into offput "10" into char off to off+1 of premap-- baseshput 96+i*2-1 into offput "5A" into char off to off+1 of premap-- basemiput 128+i*2-1 into offput "5A" into char off to off+1 of premap-- basearput 160+i*2-1 into offput "5A" into char off to off+1 of premapend repeat-- convert pillboxes to hexrepeat with i=1 to pillbox--xput "," & item 1 of line i of pillboxes into decxput offset(decx,cd field "convert") into tput char t-2 to t-1 of cd field "convert" into hexput 192+i*2-1 into offput hex into char off to off+1 of premap--yput "," & item 2 of line i of pillboxes into decyput offset(decy,cd field "convert") into tput char t-2 to t-1 of cd field "convert" into hexput 224+i*2-1 into offput hex into char off to off+1 of premapend repeatput premap into cd field "premap2"put premap & map into bg field "map"select text of bg field "map"domenu Copy Textput map into bg field "map"go to card "editor"answer "I have copied the hexidecimal map into the ClipBoard. Now use ResEdit to Paste over the entire BMAP resource of Bolo." with "OK"end ifend mouseUp</script>
</part>
<part>
<id>25</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>201</left>
<top>29</top>
<right>272</right>
<bottom>439</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>12</textHeight>
<name>chart</name>
<script></script>
</part>
<part>
<id>27</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>3</left>
<top>271</top>
<right>42</right>
<bottom>291</bottom>
</rect>
<style>shadow</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Grass</name>
<script>on mouseUpask "How much grass (1-10)?" with 3put it into sizeif size is empty then exit mouseupask "Only put grass on what? (T:tree,~:water,S:swamp,W:wall or =:road)?" with "~"put char 1 of it into defaltif defalt is empty then exit mouseupset the hilite of cd button the short name of me to trueput bg field "map" into cd field "before"get grass(size,defalt)set the hilite of cd button the short name of me to falseend mouseUp</script>
</part>
<part>
<id>29</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>7</left>
<top>141</top>
<right>42</right>
<bottom>163</bottom>
</rect>
<style>shadow</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>1018</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>mine</name>
<script>on mouseUpunhilite(the short name of me)set the hilite of cd button the short name of me to trueend mouseUp</script>
</part>
<part>
<id>30</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>44</left>
<top>141</top>
<right>79</right>
<bottom>163</bottom>
</rect>
<style>shadow</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>13618</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>boat</name>
<script>on mouseUpunhilite(the short name of me)set the hilite of cd button the short name of me to trueend mouseUp</script>
</part>
<part>
<id>31</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>7</left>
<top>164</top>
<right>42</right>
<bottom>186</bottom>
</rect>
<style>shadow</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>4496</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>crater</name>
<script>on mouseUpunhilite(the short name of me)set the hilite of cd button the short name of me to trueend mouseUp</script>
</part>
<part>
<id>32</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>44</left>
<top>164</top>
<right>79</right>
<bottom>186</bottom>
</rect>
<style>shadow</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>5533</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>rubble</name>
<script>on mouseUpunhilite(the short name of me)set the hilite of cd button the short name of me to trueend mouseUp</script>
</part>
<part>
<id>36</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>7</left>
<top>187</top>
<right>42</right>
<bottom>209</bottom>
</rect>
<style>shadow</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>25955</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>pillbox</name>
<script>on mouseUpunhilite(the short name of me)set the hilite of cd button the short name of me to trueend mouseUp</script>
</part>
<part>
<id>37</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>44</left>
<top>187</top>
<right>79</right>
<bottom>209</bottom>
</rect>
<style>shadow</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>25189</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>base</name>
<script>on mouseUpunhilite(the short name of me)set the hilite of cd button the short name of me to trueend mouseUp</script>
</part>
<part>
<id>38</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>5</left>
<top>338</top>
<right>35</right>
<bottom>363</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>save</name>
<script>on mouseUpset the hilite of cd button the short name of me to trueput cd field "mapname" into tempif temp is empty then put "Untitled" into tempask "Save this map using what name?" with tempput it into namoput cd field "names" of card "save" into allfilesrepeat with i=1 to the number of lines of allfilesput ":" & line i of allfiles & ":" into line i of allfilesend repeatput ":" & namo & ":" into nam2if namo <> empty thenif nam2 is in allfiles thenbeepanswer namo&" already exists. Replace?" with "YES" or "NO"if it is "YES" thenput true into flagelseput false into flagend ifelseput true into flagend ifif flag thenput bg field "map" into maplock screengo to card "save"if nam2 is in allfiles thenput the number of lines of allfiles into nset script of cd button namo to mapelseput the number of lines of allfiles into nput namo into line n+1 of cd field "names"domenu "new button"set the name of cd button "new button" to namoset script of cd button namo to mapend ifgo to card "editor"put namo into cd field "mapname"unlock screenend ifend ifchoose browse toolset the hilite of cd button the short name of me to falseend mouseUp</script>
<script>on mouseUpglobal ListSelectExitset the hilite of cd button the short name of me to trueget ListSelect ("1",cd fld "names" of card "save","Select a Map to Load...")put it into mapnameif mapname <> empty thenput script of cd button mapname of card "save" into mapput bg field "map" into cd field "before"put map into bg field "map"end ifset the hilite of cd button the short name of me to falseend mouseUp</script>
<text><span class="style1">OTES:1) If this is too small and makes your eyes bug out, sorry, but I wanted to get it all in on one screen.2) This only works with Hyercard 2.1, at least a 12" monitor, and ResEdit.3) The above map field uses a special hacked font, so if it doesn't look right, it might be conflicting with another font already on your system. If so, you'd have to remove that already existing font that has the same ID number.4) To load the original map, type "original" when using the </span><span class="style2">Load Map</span><span class="style1"> feature. (But this copy of the original map has some bases missing).5) I am not supporting this editor so if it doesn't work for you, I'm sorry, but right now it's the only one out there. You can improve upon this if you like, but leave my name in here someplace.DISCLAIMER: I am not responsible for any ill-effects this editor may have on your mac or the Bolo game. I strongly suggest making a copy of the original bolo application.Don Hewittdon@cat.syr.edu</span></text>
</content>
<content>
<layer>card</layer>
<id>46</id>
<text>fortress</text>
</content>
<name>editor</name>
<script>on unhilite thingglobal hthingset the hilite of cd button "grass" to falseset the hilite of cd button "tree" to falseset the hilite of cd button "water" to falseset the hilite of cd button "swamp" to falseset the hilite of cd button "wall" to falseset the hilite of cd button "road" to falseset the hilite of cd button "mine" to falseset the hilite of cd button "rubble" to falseset the hilite of cd button "crater" to falseset the hilite of cd button "boat" to falseset the hilite of cd button "pillbox" to falseset the hilite of cd button "base" to falseif thing = "grass" then put "G" into hthingelse if thing = "tree" then put "T" into hthingelse if thing = "water" then put "~" into hthingelse if thing = "swamp" then put "S" into hthingelse if thing = "wall" then put "B" into hthingelse if thing = "road" then put "=" into hthingelse if thing = "mine" then put "#" into hthingelse if thing = "rubble" then put "R" into hthingelse if thing = "crater" then put "C" into hthingelse if thing = "boat" then put "†" into hthingelse if thing = "pillbox" then put "*" into hthingelse if thing = "base" then put "+" into hthingend unhilitefunction closeto x,yput bg field "map" of card "editor" into mapput "GT~BSR=C" into stuffput "0,0,0,0,0,0,0,0" into inforepeat with i=-1 to 1repeat with j=-1 to 1put x+i into x1put y+j into y1if x1 >= 1 and x1<=104 and y1>=1 and y1<=52 thenput char x1 of line y1 of map into chput offset(ch,stuff) into cif c > 0 then add 1 to item c of infoend ifend repeatend repeatput 0 into maxput empty into keeprepeat with i=1 to the number of items of infoif item i of info > max thenput item i of info into maxput i into keepend ifend repeatif keep is empty thenreturn("G")elsereturn(char keep of stuff)end ifend closetoon opencardunhilite("grass")set the hilite of cd button "grass" to trueshow menubarhide messageend opencardfunction new size,defaltrepeat with i=1 to 104put "~" after waterend repeatput "~" into grepeat with i=1 to 102put defalt after gend repeatput "~" after gput water & return after maprepeat with i=1 to 50put g & return after mapend repeatput water after maprepeat with i=1 to 4put empty into last char of mapend repeatif size <>0 then-- do inlets (almost the same routine as coastal swamps)if size=empty or size<1 or size>10 then put 6 into sizeput (the random of (size*10))+size*100 into n-- do top and bottom sidesput 0 into crepeat with j = -1 to 1if j<>0 thenrepeat with k=1 to size*3put (the random of 102)+1 into xif j=-1 thenput 51 into yelseput 2 into yend ifrepeat with i=1 to 10+size*3if char x of line y of map = defalt thenput "~" into char x of line y of mapadd 1 to cend ifput (the random of 3) -2 into x1put (the random of 3) -2 into y1if y1 = j and the random of 3 = 1 thenput 0 into y1end ifadd x1 to xadd y1 to yif x<2 thenput 2 into xelse if x>103 thenput 103 into xelse if y<2 thenput 2 into yelse if y>51 thenput 51 into yend ifend repeatif j=-1 thenput trunc(k/(size*3)*100/4) & "% done . . ." into messageelseput 25+trunc(k/(size*3)*100/4) & "% done . . ." into messageend ifend repeatend ifend repeat-- do left and right sidesrepeat with j = -1 to 1if j<>0 thenrepeat with k=1 to size*3if j=-1 thenput 103 into xelseput 2 into xend ifput the random of 52 into yrepeat with i=1 to 10+size*2if char x of line y of map = defalt thenput "~" into char x of line y of mapadd 1 to cend ifput (the random of 3) -2 into x1put (the random of 3) -2 into y1if x1 = j and the random of 3 = 1 thenput 0 into x1end ifadd x1 to xadd y1 to yif x<2 thenput 2 into xelse if x>103 thenput 103 into xelse if y<2 thenput 2 into yelse if y>51 thenput 51 into yend ifend repeatif j=-1 thenput 50+trunc(k/(size*3)*100/4) & "% done . . ." into messageelseput 75+trunc(k/(size*3)*100/4) & "% done . . ." into messageend ifend repeatend ifend repeatend if--put map into bg field "map"hide messageend newfunction lake size,x,y-- a 10 here "could" be as big as 1/10 of the boardif size=empty or size<1 or size>10 then put 5 into sizeput (the random of (size*10))+size*50 into nput bg field "map" into mapif x<1 or x>104 thenput (the random of 102)+1 into xend ifif y<1 or y>52 thenput (the random of 50)+1 into yend ifrepeat with i=1 to nput (the random of 3) -2 into x1if x1 = 0 thenput (the random of 3) -2 into y1elseput 0 into y1end ifadd x1 to xadd y1 to yif x<2 thenput 2 into xelse if x>103 thenput 103 into xelse if y<2 thenput 2 into yelse if y>51 thenput 51 into yend if-- if char x of line y of map = "G" thenput "~" into char x of line y of map-- end ifend repeatput map into bg field "map"return(empty)end lakefunction walls size,defaltif size=empty or size<1 or size>10 then put 4 into sizeput bg field "map" into mapput 0 into irepeat while i < size*4put (the random of 102)+1 into xput (the random of 50)+1 into yput 0 into crepeat until char x of line y of map is defalt or c=10put (the random of 102)+1 into xput (the random of 50)+1 into yadd 1 to cend repeatput (the random of 3)-2 into x2put (the random of 3)-2 into y2repeat with j=1 to 10+(the random of 10)if char x of line y of map = defalt thenput "B" into char x of line y of mapend ifput (the random of 3)-2 into x1if the random of 2 is 1 then add x2 to x1if x1 >1 then put 1 into x1if x1<-1 then put -1 into x1if x1=0 thenput (the random of 3)-2 into y1if the random of 2 is 1 then add y2 to y1if y1 >1 then put 1 into y1if y1<-1 thenput -1 into y1end ifelseput 0 into y1end ifput 0 into crepeat until (char (x+x1) of line (y+y1) of map is defalt) or c=10put (the random of 3)-2 into x1if x1<>0 thenput (the random of 3)-2 into y1elseput 0 into y1end ifadd 1 to cend repeatadd x1 to xadd y1 to yend repeatadd 1 to iput trunc(i/(size*4)*100) & "% done . . ." into messageend repeatput map into bg field "map"hide messageend wallson roads sizeif size=empty or size<1 or size>10 then put 5 into sizeput bg field "map" into mapput 0 into irepeat while i < size*4put (the random of 102)+1 into xput (the random of 50)+1 into yrepeat until char x of line y of map <> "*"put (the random of 102)+1 into xput (the random of 50)+1 into yend repeatput (the random of 3)-2 into x1if x1=0 thenput (the random of 3)-2 into y1elseput 0 into y1end ifrepeat with j=1 to 30+(the random of 40)put "=" into char x of line y of mapadd x1 to xadd y1 to yif x > 103 thenput 103 into xput (the random of 3)-2 into x1if x1=0 thenput (the random of 3)-2 into y1elseput 0 into y1end ifelse if x < 2 thenput 2 into xput (the random of 3)-2 into x1if x1=0 thenput (the random of 3)-2 into y1elseput 0 into y1end ifelse if y > 51 thenput 51 into yput (the random of 3)-2 into x1if x1=0 thenput (the random of 3)-2 into y1elseput 0 into y1end ifelse if y < 2 thenput 2 into yput (the random of 3)-2 into x1if x1=0 thenput (the random of 3)-2 into y1elseput 0 into y1end ifend ifif the random of 20 is 1 thenput (the random of 3)-2 into x1if x1=0 thenput (the random of 3)-2 into y1elseput 0 into y1end ifend ifend repeatadd 1 to iend repeatput map into bg field "map"end roadsfunction trees size,defaltif size=empty or size<1 or size>10 then put 3 into sizeput bg field "map" into maprepeat with j=1 to size*3put trunc(j*1.5) into t1put the random of (50-t1) into tput trunc(t+250-j*8.2) into nput (the random of 102)+1 into xput (the random of 50)+1 into yrepeat with i=1 to nput (the random of 3) -2 into x1if x1 = 0 thenput (the random of 3) -2 into y1elseput 0 into y1end ifadd x1 to xadd y1 to yif x<2 thenput 2 into xelse if x>103 thenput 103 into xelse if y<2 thenput 2 into yelse if y>51 thenput 51 into yend ifif char x of line y of map = defalt thenput "T" into char x of line y of mapend ifend repeatput trunc(j/(size*3)*100) & "% done . . ." into messageend repeatrepeat with j=1 to size*2+5put (the random of 102)+1 into xput (the random of 50)+1 into yif char x of line y of map = defalt thenput "T" into char x of line y of mapend ifend repeatput map into bg field "map"hide messageend treesfunction grass size,defaltif size=empty or size<1 or size>10 then put 3 into sizeput bg field "map" into maprepeat with j=1 to size*3put trunc(j*1.5) into t1put the random of (50-t1) into tput trunc(t+250-j*8.2) into nput (the random of 102)+1 into xput (the random of 50)+1 into yrepeat with i=1 to nput (the random of 3) -2 into x1if x1 = 0 thenput (the random of 3) -2 into y1elseput 0 into y1end ifadd x1 to xadd y1 to yif x<2 thenput 2 into xelse if x>103 thenput 103 into xelse if y<2 thenput 2 into yelse if y>51 thenput 51 into yend ifif char x of line y of map = defalt thenput "G" into char x of line y of mapend ifend repeatput trunc(j/(size*3)*100) & "% done . . ." into messageend repeatrepeat with j=1 to size*2+5put (the random of 102)+1 into xput (the random of 50)+1 into yif char x of line y of map = defalt thenput "G" into char x of line y of mapend ifend repeatput map into bg field "map"hide messageend grassfunction cswamp size,defalt-- a 10 here is about 1/5 of the boardif size=empty or size<1 or size>10 then put 4 into sizeput (the random of (size*10))+size*100 into nput bg field "map" into map-- do top and bottom sidesrepeat with j = -1 to 1if j<>0 thenrepeat with k=1 to sizeput (the random of 102)+1 into xif j=-1 thenput 51 into yelseput 2 into yend ifrepeat until char x of line y of map <> "~"if j=-1 thensubtract 1 from yelseadd 1 to yend ifend repeatrepeat with i=1 to size*9if char x of line y of map = defalt thenput "S" into char x of line y of mapend ifput (the random of 3) -2 into x1put (the random of 3) -2 into y1if y1 = j and the random of 3 = 1 thenput 0 into y1end ifadd x1 to xadd y1 to yif x<2 thenput 2 into xelse if x>103 thenput 103 into xelse if y<2 thenput 2 into yelse if y>51 thenput 51 into yend ifend repeatif j=-1 thenput trunc(k/(size)*100/4) & "% done . . ." into messageelseput 25+trunc(k/(size)*100/4) & "% done . . ." into messageend ifend repeatend ifend repeat-- do left and right sidesrepeat with j = -1 to 1if j<>0 thenrepeat with k=1 to sizeif j=-1 thenput 103 into xelseput 2 into xend ifput (the random of 50)+1 into yrepeat until char x of line y of map <> "~"if j=-1 thensubtract 1 from xelseadd 1 to xend ifend repeatrepeat with i=1 to size*9if char x of line y of map = defalt thenput "S" into char x of line y of mapend ifput (the random of 3) -2 into x1put (the random of 3) -2 into y1if x1 = j and the random of 3 = 1 thenput 0 into x1end ifadd x1 to xadd y1 to yif x<2 thenput 2 into xelse if x>103 thenput 103 into xelse if y<2 thenput 2 into yelse if y>51 thenput 51 into yend ifend repeatif j=-1 thenput 50+trunc(k/(size)*100/4) & "% done . . ." into messageelseput 75+trunc(k/(size)*100/4) & "% done . . ." into messageend ifend repeatend ifend repeatput map into bg field "map"hide messageend cswamp-- on pillboxes-- put bg field "map" into map-- repeat with i=1 to 16-- put item 1 of line i of cd field "pills" into temp-- put trunc((temp+103)/104) into y-- put temp-((y-1)*104) into x-- put item 2 of line i of cd field "pills" into thing-- put thing into char x to x+1 of line y of map-- end repeat-- put map into bg field "map"-- end pillboxes</script>